Expand the matrix to build with and without shared libs
Fix issues in cbuff when building without threads with GCC