Make code compatible with PETSc 3.5.