Apply patch from https://svn.boost.org/trac/boost/ticket/10682