Better support for PhantomJS and Casper