Courtesy of @Eli-Zaretskii, these fixes should unblock people from
building tree-sitter with MinGW.
I don't think this is an unreasonable maintenance burden, especially
given the Emacs project's interest in using tree-sitter, but
@maxbrunsfeld gets the final call.
Older versions of GCC (<4.9) and LLVM (<3.6) do not have __atomic_load_n
which is part of the C11 standard. Fix by falling back to
__sync_fetch_and_add with a value of 0 when __atomic_load_n is not
available.
Fixes#423
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>