Partial regularity for minimizers of a class of non autonomous functionals with nonstandard growth