[cmake] improve libev handling