Setting CRYPTO_THREADID callback

Should work better on OS X