Avoiding scrolling while setting window.location.hash