Linking mongocxx and bsoncxx static libs to another c++ project

Following up on this issue, the examples were not helpful, but the issue was resolved with the parameter ~-DCMAKE_POSITION_INDEPENDENT_CODE=ON~ while compiling in cmake.