libldap_r thread-safety problems