Fixed a bug that fails to parse hostname starting with numbers.

According to RFC 1123, hostnames that begin with numbers are valid.

(cherry picked from commit open-mpi/ompi@07ff51f43f48d896d6b580279b527f793f387946)