2
Since the SqlUtility class doesn't recognize the table name in the REFERENCES clause, you will have to add the constraint outside of the module's mysql.sql file.
I would suggest generating and running the SQL to perform an "ALTER TABLE ... ADD FOREIGN KEY ..." inside the onInstall file's xoops_module_install_dirname() function.
Longer term, this should become a non-issue as we progress toward schema definitions rather than SQL for table creation.