Improved support for browsers that don't support window.history, noticed bug in #! though (ln 21)