ldap: fix the build for systems with ldap_url_parse()

Make sure that the custom struct fields are only used by code that
doesn't use a struct defintion from the outside.

Attempts to fix the problem introduced in 3dc6fc42bfc61b