diff --git a/CImg.h b/CImg.h
index 73fc3b7e3a46ee375c3238dfbdf95abce4328bd2..469aec97b67a27715a907a4a5a355cce61e753e1 100644
--- a/CImg.h
+++ b/CImg.h
@@ -3071,7 +3071,7 @@ namespace cimg_library_suffixed {
       void lock(const unsigned int n) { WaitForSingleObject(mutex[n],INFINITE); }
       void unlock(const unsigned int n) { ReleaseMutex(mutex[n]); }
       int trylock(const unsigned int) { return 0; }
-#elif cimg_use_pthread
+#elif defined(cimg_use_pthread)
       pthread_mutex_t mutex[32];
       Mutex_info() { for (unsigned int i = 0; i<32; ++i) pthread_mutex_init(&mutex[i],0); }
       void lock(const unsigned int n) { pthread_mutex_lock(&mutex[n]); }
diff --git a/examples/Makefile b/examples/Makefile
index 556e40de231ae04afa29c1c5e02925b16686af2b..81ce7502d2972b50e65f96b44849bc8a87b145ec 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -84,6 +84,11 @@ EXTRA_FILES = use_tiff_stream use_jpeg_buffer
 # Set correct variables and paths
 #---------------------------------
 VERSION = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c4 | head -c3)
+VERSION1 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c4 | head -c1)
+VERSION2 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c3 | head -c1)
+VERSION3 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c2 | head -c1)
+SVERSION=$(VERSION1).$(VERSION2).$(VERSION3)
+
 X11PATH = /usr/X11R6
 
 EXE_PRE =
@@ -294,7 +299,7 @@ endif
 #-------------------------
 .cpp:
 	@echo
-	@echo "** Compiling '$* ($(VERSION))' with '$(CXXVER)'"
+	@echo "** Compiling '$* ($(SVERSION))' with '$(CXXVER)'"
 	@echo
 	$(CXX) -o $(EXE_PRE)$*$(EXE_EXT) $< $(CFLAGS) $(CONF_CFLAGS) $(LIBS) $(CONF_LIBS)
 ifeq ($(STRIP_EXE),true)
@@ -302,7 +307,7 @@ ifeq ($(STRIP_EXE),true)
 endif
 menu:
 	@echo
-	@echo "CImg Library $(VERSION) : Examples"
+	@echo "CImg Library $(SVERSION) : Examples"
 	@echo "-----------------------------"
 	@echo "  > linux    : Linux/BSD target, X11 display, optimizations disabled."
 	@echo "  > dlinux   : Linux/BSD target, X11 display, debug mode."