Fixed Eckert IV invert function

I'm working on a map project based on D3 (http://worldmapgenerator.com) and we've found a problem with the invert Eckert IV function. I basically get a "cy not defined". I implemented the invert math formula from here to fix this : 

http://mathworld.wolfram.com/EckertIVProjection.html

It's working ok now. We use the invert function to drag the maps and to detect the country clicked. I hope this helps ;)