phantomjs fix for build scripts