Work around history.js bug related to # in URLs.

When a user tries to visit a URL containing a hash, the History.js does not fire a state change event. See https://github.com/browserstate/history.js/issues/276 for more info on this bug. As a workaround, we now go directly to the URL in such cases, rather than trying to ajax load it.