lifted version of doT.js
0.3.1