Fix connect in multi-thread environnement on Solaris