Regularity of minimizers of some integral functionals with degenerate integrands