avoid using deprecated apis in the ldap plugin