Do not have debug printout if stderr is closed.

If the profiled program closes stderr stream the igprof_debug got to be disabled
to avoid garbling the output which end up reusing the closed file descriptor.