Add xmlns attributes to svg and defs elements

I want to export glimpse.js svg graphs to images but to do this the
xml must be valid. To make valid xml it requries specifying the xmlns attributes.

Look here for more info: https://github.com/mbostock/d3/issues/1935