Haxe3 compatible

Function syntax works with both haxe2 and haxe3.