Why do you have to downgrade the lib? Why can you not have 0.9.7 and 0.9.8 both installed? If there is a symlink from /lib/libcrypto.so (or .so.6) to 0.9.8, there is nothing to prevent you from having 0.9.7 there as well. It looks like AES.pm references the lib using the full name.