added a simple way to override the Twig environment instance

should fix #893