lib/env: fixes #346 share env object across submodules

fixes #346