Older versions of iOS don't have pthread_mutexattr_setpolicy_np so dynamically look up the function and fallback on failure. Fixes #12394