Update main.lib

dynamically sets LIBRARY_DIRECTORY based on how main.lib is sourced