add the option to use dynamic linking for boost in cmake

Status Job ID Name Coverage
  Test
passed #3969
Linux
clang-c++11

00:04:43

passed #3971
Linux
clang-c++98

00:04:03

passed #3968
Linux
gcc-c++11

00:05:59

passed #3970
Linux
gcc-c++98

00:04:11

passed #3972
Apple
macos-c++11

00:03:39

passed #3973
Apple
macos-c++98

00:04:06