Only use _ReadWriteBarrier on MSVC

It was causing compile errors when cross-compiling using mingw.

No functional change.