Modified d3.custom.js to follow the commonjs dependency structure

Modified d3.custom.js to follow the commonjs dependency structure and preventing to expose it's main object globally.