Fix ip address parsing

Force functions for parsing of IP addresses to use en_US locale so that
the parsing works on system with different locales as well.