disable_cancellation and restore_cancellation need to be declared BOOST_THREAD_DECL to work with DLLs