Add runtime version querying functions.

This fixes bug #282.