Add reentrant functions gethostby*

Signed-off-by: David Goulet <dgoulet@efficios.com>