Fixed check for sys/stat.h on Unix systems.