The extension Interpreter Sniffing by Friends of I7 seems to do this, sort of. I haven't compiled it, but I recognize Friends of I7 and some of the names in the extension. So if it doesn't work, they can know about it.
This isn't quite a one-line fix, since you have to add an extension and then put in one line, but I think it is pretty good. I'd assume that, if a new interpreter is created, Glulx itself would have no way to know this.