Fix compile-templates on Linux & OS X