Fixed poll function on Linux.