Explicitly check for sys/resource.h and sys/wait.h.
Explicitly include sys/resource.h if defined.