cmake: let BUILD_SHARED_LIBS drive the type of library built

Do not force the type of library because some architectures (such as
BlackFin from AnalogDevice) do not support shared object.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>