Fix many 32-64-bit conversion issues, as found by Xcode 5.1.