Fix DOM mouse coordinates
Fix support for older Haxe versions