diff -pur nas-1.9.4-orig/server/Imakefile nas-1.9.4/server/Imakefile
--- a/server/Imakefile	2013-04-27 02:41:06.000000000 +0200
+++ b/server/Imakefile	2017-03-14 18:58:27.445311356 +0100
@@ -57,7 +57,7 @@ XCOMM $NCDId: @(#)Imakefile,v 1.17 1995/
 
 # endif
 #else
-        SYSLIBS =
+        SYSLIBS = $(LEXLIB)
 #endif
 
 #ifdef NetBSDArchitecture
