Haxe3 compatibility

These small changes allowed mlib to compile successfully with Haxe3 (latest SVN) and Neko 2.0RC (latest SVN).

Realistically, the only important commit here is: 3b903d2, the rest were incidental.

These changes should not affect compatibility with Haxe 2.10, but it might be worth waiting on this Pull Request until Haxe3 is released so we can keep updating it as Haxe3 continues to develop.