Modify the dispatch library function to use the user's environment.

Signed-off-by: Jason Stephenson <jason@sigio.com>