Added support for phantomjs (not tested)