properly exporting in commonjs context and requiring d3 dependency to assign it to global that is expected to be present