Similar fix as https://github.com/bytecodealliance/wasmtime/pull/13883, but needed for riscv64
Similar fix as #13883, but needed for riscv64