Need to include <sys/stat.h>. Bug #21516.