fixed resolve_template_function for meteor 0.8.2 and earlier