[cmake,release] Do not try to set BUILD_SHARED from other variables.

With this patch the default is again building static libraries unless
one specifies -DBUILD_SHARED=True to cmake. This is not a fix but a
workaround for flyspray #1429
https://dune-project.org/flyspray/index.php?do=details&task_id=1429