generic: fix for wrong checksum calculation on 64bit systems - thx tr3b, fixes #210

Merged into 'v2.71' branch by Radegast