support for mac classic line endings `\r`