Make static library if BUILD_SHARED_LIBS is OFF.