Fix #1397 - add beforesend event to d3.xhr.