use dmb only on ARM v7, otherwise __sync_synchronize

dmb is only available on ARM v7; for older versions using the GCC builtin.