Basic internet checksum implementation.