Modelling of a two-dimensional photonic crystal as an antireflection coating for optoelectronic applications