Use kqueue/kevent for polling in MacOS.