Make templates work with --disable-x11