Select fix

Switched all select() code with poll().

TODO create libcompat poll() wrapper for old OS.