[runtime] Factor out some duplicate code from the MonoJitInfo creation code.