Nif locking: thread-safety on platforms lacking crypt_r

FreeBSD 10 lacks crypt_r function too. So, 
a) configure script introduced to check for crypt_r function and <alloca.h> header
b) access to crypt function is protected by erlang mutex, so nif is thread-safe even on 
platforms lacking crypt_r.