Only add to LD_LIBRARY_PATH if any library files exist in it
Remove .a and .la