Fix issue #321. Prevent History.onUnload being called unnecessarily

- Primarily for non Internet Explorer browsers