Thread: link with boost_atomic conditionaly.