Resolve race with libpthread initialization.