Replace references to APIs that were deprecated starting in OS X Yosemite