added libevent detection