Use a cleaner method for recognizing EADDRINUSE

As suggested by @kr.