Fix build on Mac.

 - dropped some unused variables.
 - workaround about libev++ conflicting with EV_ERROR variable declared in <event.h>
 - forgotten include.