Calculate checksum modulo 65536