Links with no href attribute shouldn't cause a 404

 A 3rd party script I'm using  [Chosen](http://harvesthq.github.io/chosen/) generates an `a` element without a `href` attribute, which will cause a 404 when clicked if we don't check for `href.length` in the onclick handler.