Fix build when LDAP isn't found

449e2e09 changed the interface to use unique_ptr, but only
changed the implementation for the case that LDAP (dev-packages)
is found. Remove the now-errorful `delete d` from the no-LDAP
branch as well.
2 jobs for master in 4 minutes and 11 seconds (queued for 115 minutes and 52 seconds)