configure: also close stdout when calling cc