Put the forward declaration of _ReadWriteBarrier before the intrinsic pragma to avoid errors in some MSVC versions