Set OPENSSL_EC_NAMED_CURVE on our EC_KEY instances

Replaces #1523