Allow overriding of LDAP_LIBS

Part of #1826