support LIBDIR macro