Add an explicit cast to long so as to make Orbiter compatible with both 32-bit and 64-bit devices.

Compiling for 64-bit right now gives warnings about this.