Fixed deprecation warnings for Xcode 4.6