Autodetect network interface when searching for machine IP

Fix #151