Fix EC issue on Fedora 20

Fix for #1143
`_elliptic_curve_to_nid` can also raise the same error.

It's like this to minimise the number of branches because I can't have a branch only taken by the weird Fedora 20 OpenSSL and still maintain coverage.