[CMake] Make sure to build a shared library, not static. Change library target name.