revert change leading to use of uninitialised variable

this was preventing build with -Wall
use ldap_unbind_ext_s() to avoid memory leak

... as ldap_destroy() is only available in newer libldap versions.