fix iOS build, fix OSX crash associated with Xcode 5.01