Cherry-pick clang compilation fixes from Boost upstream

Relevant commits are 6bb71fd@boostorg/atomic and e4bde20@boostorg/atomic.