Some function calls are deprecated on OS X.