Fixing deprecation messages

Fixing deprecation messages encountered when building for iOS version 6.0 and later.