Make runtime API more similar to Apple's.

This makes it easier to use runtime functions in portable code.