Improve support for Windows line endings