Fix pre-Yosemite code. Fixes #17.