Fix a problem caused when a nonstandard stdout is defined and not
properly implemented