Resolves issue #20 on browsers that support the window.history api