Include sys/select.h in subprocess-posix.cc

pselect() is in sys/select.h in "newer" (2001) versions of posix, so add an include for it.

While here, only include poll.h if USE_PPOLL is defined.
diff --git a/src/subprocess-posix.cc b/src/subprocess-posix.cc
index fc5543e..74785d1 100644
--- a/src/subprocess-posix.cc
+++ b/src/subprocess-posix.cc
@@ -18,13 +18,18 @@
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <poll.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/wait.h>
 #include <spawn.h>
 
+#if defined(USE_PPOLL)
+#include <poll.h>
+#else
+#include <sys/select.h>
+#endif
+
 extern char** environ;
 
 #include "util.h"