Fix problem with poll() on AIX.

Its seems that unlike Linux, Solaris and Windows AIX has a somewhat
other idea in what flags it needs in the events field of the poll
structure. This patch makes poll() work on AIX and should also keep it
working on the other platforms.