Make EVP_CIPHER_CTX_copy work in GCM mode.

Taken from upstream.