rt: Make some runtime calls work outside of task context