Support more build configurations

This patchset allows building for more configurations:

* Clang does not support `-pg` and `-fopenmp` options
* Static Boost libraries are not compiled with `-fPIC`, so they cannot be used in shared object
* If we are building a shared object, the unit test must have a symbol to generate a `main` function
* Missing header include if building with libraries that doesn't automatically include `<cstdlib>`