JavaScript conversion of crypt_md5() (Original by Poul-Henning Kamp)