tok: improve the nmea_calc_crc function a bit