add header guard to template definitions