Move getip import statement into function.

This means the rest of the program should work
on machines without the getip module present.