better support for PhantomJS: ignore alerts and confirms