Introduced global swith BUILD_SHARED_LIBS

Introduced new global build switch BUILD_SHARED_LIBS which defaults to ON. Observe that the special casing of MSVC is removed, i.e. you must invoke cmake as: