Fixed DNS reverse lookup to work in all versions of ruby