Fixed twigjs amd module compiler

I have a build script to compile some twig templates:

#!/usr/bin/env bash
../../libs/twig/bin/twigjs \
--output compiled \
--module amd \
--twig twig \
.

The compiled files were failing with a undefined variable templates exception which this commit hopefully resolves.