Use cache variable to set BUILD_SHARED_LIBS rather than ordinary
Change from old logic (which forced static library build for
most Windows cases) to forced static library build only
for the combination of Windows and ninja generator. This
is only a temporary measure to work around a ninja generator bug
on Windows for the combination of shared libraries and using
the same name kernel ("qhull" in this case) for an executable
and shared library.