Fixing a webkit bug where the popstate event is fired onload.