A regularity theorem for omega-minimizers of integrals functionals