use value of DIRECTORY_SEPARATOR to detect Windows

This commit unifies the detection of Windows builds across the Symfony
codebase.