Add support for async invocations. Fixes #20.