Absence of Lavrentiev gap for non-autonomous functionals with (p,q)-growth