fix libevent with multithread