Use the history object in an iframe

This prevents the cases where history.pushState and History.prototype.pushState are overwritten.
Since this happens on page load, I wanted to allow for short circuit behavior when window.history.pushState exists, which is 98% of the time.