Updated to the latest version of d3.js and added support for AMD

Fixes #405