If output buffering is turned on, PHP can be a bit slack about sending
the data to the client before closing the connection with exit(). These
changes ensure we call ob_flush() before we leave. We call @ob_flush()
so we don't get noisy warnings when output buffering is off...