Add simple thread and mutex wrappers.