Support a flexible format for gathering globally scoped definitions

Per #207.