launch phantomjs when needed