Add some ifdefs for the PETSc version related to local indexing.