Use the hashchange event instead of popstate, as IE 8+ supports hashchange