EC: Refactor ec_curve_name2nid() to accept NIST curve names