Pure javascript hash change module with back button support