Quantitative determination of optical and recombination losses in thin-film photovoltaic devices based on external quantum efficiency analysis