Add a few more functions to the runtime library for #101.

No functional changes.
Merge pull request #184 from pjonsson/more-rtlib

Add a few more functions to the runtime library for #101.