Build fixes for iOS 6