Fix ios6 deprecation warnings