Support change from Lambda to LocalFunction in Haxe 3.1

Please note: I haven't tested that this form of conditional works with Haxe 2.10... If it doesn't I don't know what the best way to catch this will be.