Fix problems with d3.event. Firefox compatibility