Adding libevent2 to the build and getting rid of some warnings