Migration from haxe 2 to haxe 3. Fixed issue https://github.com/cameron314/PNGEncoder2/issues/4