Added facility to use an externally supplied C function

I added a few functions to `BaseContext` to allow the use of external functions that are linked into the module at runtime.