Split with "\r?\n" instead of "\n" for Windows

Closes #1305