fix($location): fix URL interception in hash-bang mode

Closes #1051