Fix for phantomJS issue on OSX