Photonic crystal cavities for sensing: Dielectric modes versus air modes