Fix phantomjs tests