WIP #6: Updates to support multiple LDAP versions.