fixed up compilation problems for petsc and sundials