Apply updated patches from #8476.
Fixes #8476.

git-svn-id: http://svn.boost.org/svn/boost/trunk@84052 b8fc166d-592f-0410-95f2-cb63ce0dd405
Apply patch from #8494.
Refs #8494.

git-svn-id: http://svn.boost.org/svn/boost/trunk@84053 b8fc166d-592f-0410-95f2-cb63ce0dd405