Do not even invoke getLocalHost() if not necessary

Some systems are getting exceptions from getLocalHost() and
setting isUseLocalHost() had no positive effect on them.
Merge pull request #14 from bozzzzo/master

Do not even invoke getLocalHost() if not necessary