generic: fix for wrong checksum calculation on 64bit systems - thx tr3b