extending d3 to not pollute the global namespace