Avoid segfault when deleting petsc options