rt: Make some runtime calls work outside of task context

Just a few minor things required for freestanding Rust.