Fix p3 32bit

Fixed: integer overflow on 32-bit machines wasn't detected correctly under Python 3.