Print verbose messages to stderr. Fixes #1036752.
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 50851a8..2b5a11a 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -113,7 +113,8 @@
 #endif
 
 	if (Py_VerboseFlag)
-		printf("dlopen(\"%s\", %x);\n", pathname, dlopenflags);
+		PySys_WriteStderr("dlopen(\"%s\", %x);\n", pathname, 
+				  dlopenflags);
 
 #ifdef __VMS
 	/* VMS currently don't allow a pathname, use a logical name instead */