I could not make it work with building from source --with-openssl.. md5.h does not get detected..
What did work was to install the packages from squeeze including openssl 0.9.8 and libmysqlclient16 Hope for a better solution than the above workaround.