Updated to suit event2/event.h