build: fix dynamic boost check when --with-boost= is used (cherry picked from commit a7d1f035ae2b33d5242d9aee5da1b538a0f5adba)
build: fix dynamic boost check when --with-boost= is used
(cherry picked from commit a7d1f035ae2b33d5242d9aee5da1b538a0f5adba)

Infernoman/crowncoin,Crowndev/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,Crowndev/crowncoin,Infernoman/crowncoin,Infernoman/crowncoin,Crowndev/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,domob1812/crowncoin,Crowndev/crowncoin,Infernoman/crowncoin