better line ending normalization