fix for phantomjs 2.0