cmake: Don't use poll() on Mac OS X, as it can't poll a tty properly.