Fix for Event Handlers on SVG Elements with a class.

On SVGElements the class attribute is an instance of SVGAnimatedString. This object doesn't have a replace method.

For svg elements we should use className.baseVal as value instead of the  className to prevent runtime errors