fix out-of-bounds array access in pthread barriers on 64-bit