Fixed compilation in systems without EPOLL

(cherry picked from 7d727aafa93f79421304121d95f2a038bdbf887c)