Don't hardcode -levent in linker flags. Use @LIBEVENT_LIBS@ instead