Tandem photovoltaic cells with a composite intermediate layer