fix for d3 version 3 + amd