Here's what I did to get haxelib working:
[ you'll need basic 'make' tools, and some more dependencies like 'libgc-dev' ]
tar zxf neko-2.0.0.tar.gz
I'm doing individual make steps because 'make all' won't work for me
make libs ( interactive, you will be asked to skip if a package is not avaiblable)
sudo make install
tar zxf haxe-3.1.3-raspi.tar.gz
This all seems to work well and
haxelib install openfl
haxelib run openfl setup
Uncaught exception - load.c(237) : Failed to load library : /usr/lib/haxe/lib/lime/2,5,2//ndll/Linux/lime.ndll (/usr/lib/haxe/lib/lime/2,5,2//ndll/Linux/lime.ndll: cannot open shared object file: No such file or directory)
note the double forwardslash before ndll.
Maybe this info helps you ...