Fix support for iOS 6