Use phantomjs with promises