poll() emulation for BeOS, and maybe MinGW.