This method is actually fine, although it looks hackish. In fact, this is how Jinja2 2.5+ does it as well.
See their code below. It is just dictionary manipulation.
https://github.com/mitsuhiko/jinja2/blob/master/jinja2/environment.py
```

    def add_extension(self, extension):
        """Adds an extension after the environment was created.

        .. versionadded:: 2.5
        """
        self.extensions.update(load_extensions(self, [extension]))

def load_extensions(environment, extensions):
    """Load the extensions from the list and bind it to the environment.
    Returns a dict of instantiated environments.
    """
    result = {}
    for extension in extensions:
        if isinstance(extension, string_types):
            extension = import_string(extension)
        result[extension.identifier] = extension(environment)
    return result
```