Fix building PhantomJS on Linux and OS X build