crypto: use better memory BIO implementation