Fixes for IOS 8, 64-bit support