Fix GC steps threshold handling when called by JIT-compiled code.

Thanks to Cheng, Long.
Fix for last commit