Replace "LIBDIR" with "LIBRARY" and make it user-specifiable