adapt hashbang url for phonegap app and html5mode for web