ENHANCEMENT Only call ob_end_flush() if there is an output buffer to flush

Avoids triggering E_NOTICE.  Solves https://github.com/silverstripe-labs/silverstripe-secureassets/issues/15