Replace deprecated MD5 with hashlib.