fix tests

- C host must explicitly be linked against pthread

- need dummy ref to _d_dso_registry to support weak linkage