thread fix: https://svn.boost.org/trac/boost/ticket/9333