Auto determine line endings