Improve compatibility for Yosemite.