It would not be too hard (to program), even if there is no library. Just keep track of where the servo is, and do a analogRead on the pin the IR is on, and convert that to a distance (or don't convert, thats optional, if you are just interested in avoiding things). If the servo is to the left, and the voltage(ie the return of analogRead() ) goes beyond a threshold, then have your robot go right.