[CMake] Enable loadable modules, aka plugins, with BUILD_SHARED_LIBS on cygming.

Loadable modules could be enabled without BUILD_SHARED_LIBS with tweaks in future.