Rewrite the myAddress function to use getifaddrs

The previous implementation (based on the windows version) would get the
hostname of the current machine and then look up the address based on
the host name. For whatever reason, this works fine on 10.6 but not at
all on 10.9.

This new implementation should be more reliable and seems to be a more
correct way to obtain the desired information. Basically it iterates
over the available network interfaces (ignoring the loopback) and once
it finds a valid, connected interface with an IPv4 address, it sets the
value and returns. If it never finds a valid connection, it returns the
loopback address (0x7F000001).