[win] Fix bugs of LDAP.