Win32: Don't use S_ISDIR

This macro isn't defined on windows. Instead, use its expansion:

    #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) /* directory */