Fix a couple of bugs in the build system:

- Don't add benchmarks when the Benchmarks module is not available
- Properly handle tests and examples depending on Boost