diff --git a/io/file/amiramesh/amirameshwriter.cc b/io/file/amiramesh/amirameshwriter.cc
index 7baa97dc185c7d9efdfe0ef0d63332380d9dc1ca..701ae654b3b23db49cab2395aa5f0732430d1d2a 100644
--- a/io/file/amiramesh/amirameshwriter.cc
+++ b/io/file/amiramesh/amirameshwriter.cc
@@ -1,6 +1,8 @@
 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 // vi: set et ts=4 sw=2 sts=2:
+#define NEWSTYLE_IOSTREAM
 #include <amiramesh/AmiraMesh.h>
+#undef NEWSTYLE_IOSTREAM
 
 #include <algorithm>