64 bit proof ImagingNew

For win-amd64, where sizeof(long) == 32