Use 64 bit integers on all platforms
Currently, 32 bit integers are used on 32 bit platforms, and 64 bit on 64 bit platforms. This leads to observable differences in behavior that should be avoidable. Using "long long" internally should solve the problem with a hopefully negligible performance impact.