apply line ending fix only on Windows
fix for #4785

(cherry picked from commit 16a70d6005443fe24557d20566cd40da66dcbd82)