Cleanup the EVP_MD_CTX before exit rather than after