Fixed deprecation errors for iOS 6. We completely ignore backwards compatibility though.