Duh, perhaps I should have paid attention to the committed patch instead of your description of the problem... The patch breaks in a different way than I said.
Replace ldap_utf8_strchr with ldap_utf8_strpbrk and it should work. I probably can't test it today.