Fix 'd3 is not defined' problem as seen in #64

This change resolves the issue for me in testing - the cause appears to be a recent change in D3 itself, but fortunately @mbostock has also provided the fix used here as well: 

http://git.io/fiNrQA

Relevant comment in discussion of #64:

http://git.io/RdKJZA