Refactor fabric.StaticCanvas#toSVG