Phantomjs: Yosemite fixes

This is a pretty clunky workaround, and I’m open to suggestions on how to make this more automatic for users, but it does the job if the maintainers are happy with it.
Are you sure this is needed? I submitted a PR to remove it.