Fixed PHP-706: Replace select() with poll() for network time-outs

This is only in effect if streams are disabled.
Patch by Taneli Leppä.