Use platform-specific newline. Fixes #987