Check for the presence of sys/select.h and conditionally #include it.