Updated to HaXe 3 (apparent fix for issue #4).
Code is still backwards compatible with HaXe 2.