Make library type a cache option

Background: Eyescale/CMake#239 and related PRs make the library type a
"global" option provided at cmake configure time by Buildyard for all
projects consistently. This change does not override this setting, but
will still set STATIC in the standalone case.