tf.ENV is a global mutable object that is exported from the module. This isn't allowed in ES2015 semantics and thus closure has problems with it. Let's remove this in favor of tf.environment().