When <gssapi/gssapi_krb5.h> stems from Heimdal but build-heimdal/config.h doesn't define HAVE_GSSAPI_GSSAPI_KRB5_H, <gssapi/gssapi_krb5.h> is not included.
The header file is only checked if gsskrb5_register_acceptor_identity is not found.
Move the header check so that it works for both KRB5 and Heimdal.
When <gssapi/gssapi_krb5.h> stems from Heimdal but build-heimdal/config.h doesn't define HAVE_GSSAPI_GSSAPI_KRB5_H, <gssapi/gssapi_krb5.h> is not included.
The header file is only checked if gsskrb5_register_acceptor_identity is not found.
Move the header check so that it works for both KRB5 and Heimdal.
Link: https://bugs.debian.org/1066214