add compile flags for libevent threading
add libevent threading support to example.c