svg: add util methods for class attribute