PETSc config works on Mac too

See commit comments.

@wenqing Please don't run an uncrustify tool on CMake files. Indentation was messed up.