build: Update md5.h detection in waf and autoconf to use sys/md5.h and -lmd