Fix linking issues with MongoDB and newer Boost