[Issue 8183] ldap_init() failed at sub thread but runs ok at main.