Add travis and fix broken tests in phantomjs