Added support for platform newline detection.