Use standard BUILD_SHARED_LIBS var

see: http://www.cmake.org/Wiki/CMake_Useful_Variables