Fix build without libtiff

Bug #104813
diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc
index 6ac8dc9..63f7399 100644
--- a/utils/ImageOutputDev.cc
+++ b/utils/ImageOutputDev.cc
@@ -24,6 +24,7 @@
 // Copyright (C) 2013 Thomas Fischer <fischer@unix-ag.uni-kl.de>
 // Copyright (C) 2013 Hib Eris <hib@hiberis.nl>
 // Copyright (C) 2017 Caolán McNamara <caolanm@redhat.com>
+// Copyright (C) 2018 Andreas Gruenbacher <agruenba@redhat.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -651,9 +652,9 @@
     }
 
     writeImageFile(writer, format, "tif", str, width, height, colorMap);
-#endif
-    delete writer;
 
+    delete writer;
+#endif
   } else {
     // output in PPM/PBM format
     ImgWriter *writer;