do not force the use of static boost libraries if the ENABLE_SHARED variable is undefined

we only want to force the use of shared libraries if ENABLE_SHARED is
set to true. if it is unset, we don't care.