Tie undo history with browser history when possible.