Fix some pointer-to-int cast warnings on 64 bit archs