Fix pointer-to-integer casting when building in 64 bit mode

This allows building (without assembly) in 64 bit mode as well.