made getlocalips work on mac OS X (BSD)