Link to the openssl val_secalgo implementation and use that, after adjusting the source of Nettle includes. GnuTLS uses Nettle itself, so this is not adding a new dependency.