add libevent support