Transmission properties of a two-dimensional photonic crystal slab with an excitonic resonance