Fix resetting of terminal colors in the trace after a system call.

Previously it unconditionally emitted an ASCII escape code on UNIX, even
if use the stream didn't support colors.