Fix Haxe 3 support for HTML5