pthread: include sys/types.h before sys/sysctl.h