Better ldap version fixes