Fix \r\n issue on non-Windows platforms