[jit] Fix enum->int casts in gsharedvt code. Fixes #21893.