Use iterate() instead of readdir() on newer kernels