Bind to hashchange only when needed