Merge pull request #2 from xnox/bug-695604

Fallback to lstat, if the non-portable dirent.d_type is not available.