Exporting scm_register_thread.