added support for phantomjs