Use BUILD_SHARED_LIBS variable