Fixed deprecation warnings

Fixed warnings when building with a minimum deployment target set to OS X 10.10.