cdsclient: force correct mandir
gmsh: Build also as library

Closes #950.