session: add support for custom environment variables