Changes for compatibility

Added compatibility for Haxe 3.x and OpenFL