EC curve APIs from OpenSSL 1.0.2

For #832. We might not want to merge this until OpenSSL 1.0.2 gets an actual release.