fix opendir, fpathconf and ttyname_r to use fstat64(), not fstat()