Add memory fences.