Ticket #348 - crash in ldap_initialize with multiple threads
previous fix would crash in ldclt - this fixes that crash
(cherry picked from commit 7b0f365a068a5351268bc68daaa166e796627f0d)
(cherry picked from commit 85ab6094b6d6b5010260007e9662357757473600)