Update code for 'template_list' to Blender 2.66 version.
Add flags for compatibility and old versions