Fix webdriver tests

make compatible with PhantomJS 1.9.2+