Add setenv() helper for referencing from JS.