Fix Flash support, temporarily casting in order to fix a Haxe 3 RC bug