Effect of vertical mode matching on defect resonances in one-dimensional photonic crystal slabs