Use canvg. Ref: shreshthmohan/data-viz-d3#16