I think I've fixed the problem. I created a startup.pl file which included a BEGIN block that set $ENV{'PFPRO_CERT_PATH'} to the correct location. Apparently something important has already happened with the client library by the time the variable was being set other ways.