Use pthread_atfork to lock/unlock yaz_log system