Automatically detect line endings