fix compilation issues with Xcode 6 and iOS 8