Better way to escape ldap metacharacters