crc-8 checksum generation in javascript