Port r172856: 'Include ubsan runtime even when building a shared library. We don't require executable to be linked with UBSan.' to Mac