check if STDOUT is defined in plaintext.php to avoid notices (will now also prevent line wrapping when not on a shell, e.g. for browser output), refs #1214
merge 70553ea372102c82348b85af1d69db17f5b418ca to de96f857b5bfd4a7873144e15ecfe04c8b00a15d (from 1.0)