Fix test for gcry_pk_get_curve.
Add a compatibility fixes for the non-curve case. Remove -lber from the dirmngr link line.