fix for PETSc 3.1 and older