Javascript SVG parser and renderer on Canvas