Solved "Document is missing element map" error and fixed html5 target issue.

Previous implementation caused "Document is missing element map" error after switching from haxe 2 + nme to haxe 3 + openfl (as described here: http://forum.haxepunk.com/index.php?topic=339.0). Also it should be possible to build for html5/js target now.