Check CRYPTO_UNLOCK flag in libcrypto's lock function