Fixing test in PhantomJS