Work around IE's broken onhashchange implementation.