Fixes for PetscInt!=int compatibility