Fix an oversight that prevented code from compiling.

The add-and-dot patch did not compile with PETSc enabled because of a mismatched declaration. I don't have access to a sufficiently fast machine to verify that the patch proposed here actually works, but am reasonably confident that it does (which usually means that it won't, of course).