Fixed mouseX/Y undefined behaviour in Firefox

I have written about this in the issue section. I just added event.layerX/Y to the updateMouseCoords function.