Defer hostname determination to the post_config hook

This is an untested (compiled but not run) attempt to fix #41 by deferring the looking up of the hostname until the post_config hook.