Fix compile problems with older versions of boost.