More build system improvements.

(PISM should finally be able to find libraries on pacman.)