Make tests pass in phantomjs

phantomjs doesn't support window.history.state, so we can't test
anything related to it when running there.