src: check curve ID existence instead of asn flags
Simplify the code. The flag check was in the OpenSSL source, but reading through the docs and source, it is not necessary.
Fixes: https://github.com/nodejs/node/pull/24358/files#r243099693
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines