fix($location): correctly rewrite search params when html5 mode is enabled and not supported by browser

The conversion from html5 url to hashbang url failed to take into account search params if the path wasn't modified. I used the same test that the one used in the conversion of a hashbang url to an html5 url (https://github.com/tleruitte/angular.js/blob/master/src/ng/location.js#L67).