fix test on PhantomJS