Haxe3/OpenFL compatibility

Hi! I've been playing with waxe and it looks really useful! These changes make it work with openfl3/haxe3.