Remove unused TyDesc parameter from the glue functions

To remove the environment pointer, support for function pointers without
an environment argument is needed (i.e. a fixed version of #6661).