CMake: Added option whether to build static or shared library