Save/restore valstack in JavaScript ffi wrapper (multi-arg support)