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

... to @sfyang

Please review @karlitschek @schiesbn @kabum or others