LDAP: Fix base-comparison with multibyte characters, fixes #5081. Thanks to @sfyang