fix issue #1583: make ERROR_REPORT available in setup
When used in library mode, ERROR_REPORT is a magic mock object to let setup executing properly, without installing an except hook
When used in library mode, ERROR_REPORT is a magic mock object to let setup executing properly, without installing an except hook