r8745: make ldap.js cleanup after itself