Fix NameError in Ruby 1.9.3

`IPAddr::InvalidAddressError` is undefined in Ruby 1.9.3. This request will resolve the issue #1.