add #ifdef LINSOLV guards in appropriate places in case someone (e.g. buildbot) compiles without cholmod