Fix needsclick class check on SVG elements

`className` property on SVG elements is an instance of `SVGAnimatedString`, so the needsclick check, which expects `className` to be a string, fails on SVG elements.

https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString