compatibility with phantomjs