Backport IPv6 fix

https://code.google.com/p/k9mail/issues/detail?id=803
https://github.com/k9mail/k-9/commit/696666ca5e04c841c832cae0e5068ec1224ad1f0