Library settles lawsuit over roof replacement