CMakeLists: mark libs as required when we are configured to use them

Also mark the min. Boost version that works for us.
Fix terrible test bug that I only caught for an unrelated reason.