Only add PROTOBUF_USE_DLLS for shared build

Guard set_target_properties(...) call with BUILD_SHARED_LIBS
, it should only be set for shared builds.