Use win32 newlines in templated files on windows

Fixes #4355