Avoid a NULL deref in i2d_ECPrivateKey() when an EC_KEY lacks the public key
member (which is perfectly acceptable).

From BoringSSL (Adam Langley), commit f71a27920a903c9c36bcb31e68781b17674d3fd2