fix($location): compatibility with SVG anchors

In SVGs, the `href` property of an anchor element is a `SVGAnimatedString`, so it needs to be unpacked.

Demonstration of this problem: http://jsfiddle.net/sirhc/MKQnM/

Fixes #1420 .