Fix PhantomJS tests