Fix bug parsing SVG `className`

When I made the PR to add class names to the labels, I forgot that all
SVG elements use an object for the `className` property. This PR fixes
that :bug:.