Molecular gas at intermediate redshifts