Relaxation of degenerate variational integrals