Improve const correctness for stacks of EVP_MD