Update CMakeLists.txt

does not build on win32
fix CMakeLists.txt on Mac/Linux when using BUILD_SHARED_LIBS
Merge pull request #249 from erwincoumans/master

fix CMakeLists.txt on Mac/Linux when using BUILD_SHARED_LIBS
Merge pull request #241 from xantares/patch-1

Fix removed dir