--- a/sys_win.c
+++ b/sys_win.c
@@ -832,7 +832,7 @@
 	char path[MAX_PATH_LENGTH];
 	char sname[256];
 
-	sprintf( sname, "pano12.%s", fname );
+	sprintf( sname, "pano13.%s", fname );
 	
 	path[0] = 0;
 	
@@ -907,6 +907,8 @@
 	}
 }
 
+#if defined _USRDLL
+// Only include the DLLMain with the dll build of pano13
 BOOL WINAPI
 DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
 {
@@ -937,4 +939,4 @@
     }
     return TRUE;
 }
-
+#endif