Fix line splitting on windows

Split lines on `\r\n`, `\r` and `\n`.