Fix a regression introduced by the gsharedvt changes. Delegate invokes to gshared methods using a non-generic delegate type would crash. Fixes #10513.