The board of trustees of a library, under such rules and regulations as it may deem necessary and upon such terms and conditions as may be agreed upon, may allow nonresidents of the governmental unit in which the library is situated to use the books thereof, and may make exchanges of books with any other library, either permanently or temporarily.