Apply patches from https://svn.boost.org/trac/boost/ticket/7317
Fixes msvc-11 compile failures.