Add the renpy.invoke_in_thread function.