musl: fix locking synchronization bug