Merge "Fix non-standard pthread mutex interactions."