Add native implementation of crypt as well as emscripten one

No more "-lcrypt" dependency. There is also an alternative JS implementation. All in all this should be more portable, for example for Windows.