Does not work correctly with all reasonably-recent version of CMake and boost, let's try to figure out something better... This reverts commit 65689f19.