(http://marc.info/?l=openbsd-misc&m=143552406830762):
automagically add pthread to Boost_LIBRARIES and '-pthread' to
compiler flags if the boost_thread component is requested.
Fix boost_thread's "Compiler threading support is not turned on,
please set the correct command line options for threading" error
without the need to tamper with CMAKE_CXX_FLAGS.
Based on a patch found in the Debian package for cmake, which I've
enhanced/modernized a bit.