--- lib/libpe/Makefile	2014-01-13 16:38:41.000000000 +0100
+++ lib/libpe/Makefile.new	2014-01-13 16:40:25.000000000 +0100
@@ -72,7 +72,7 @@
 	$(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^
 else ifeq ($(PLATFORM_OS), Darwin)
 	$(LINK) -headerpad_max_install_names -dynamiclib \
-		-flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \
+		-flat_namespace -install_name ${libdir}/$(LIBNAME).$(VERSION).dylib \
 		-current_version $(VERSION) -compatibility_version $(VERSION) \
 		$(LDFLAGS) -o $(LIBNAME).dylib $^
 else ifeq ($(PLATFORM_OS), CYGWIN)