FreeBSD compatibility fixes

EAI_NODATA has been made obsolete.
Properly detect MD5Init in -lmd