I have done a patch on the configure.in file for 1.22.1. Unfortunately this is not a shipped file and is only used to generate the 'configure' script. In the meantime i would suggest doing as per the other thread and copying the md5.h section over from the 1.21.4 configure file. Essentially the problem occurs because another header file, stdlib.h, seems to have stopped being included by default and this contains a definition that configure needs when validating md5.h
Just to confirm you have the same problem, can you post the relevant section of your config.log file. It should have a small test program that includes md5.h, so just post from there on.