Prevent leak of d3 global in node.

Fixes #2006.