Add support for running under PhantomJS and Travis