Fix CMakeLists.txt

In Linux, the library seems need to be built as shared.