[Issue 9389] Improve the way how libldap handles interruption signal while in tls_read