cmake: added BUILD_SHARED_LIBS option

If ON libraries will be built as shared. By default ON