Light-trapping enhancement in thin film solar cells with photonic crystals