Add STATIC to libraries in CMakeLists.txt files