Support Python2 ipaddr library.