Fix a BIO leak when verifying SSL certificates or calling get_peer_cert (closes #16).
Credits to @nelhage (author of the pull request for EM official project).