Since we cannot migrate to openpam now, upgrade to linux-pam version 0.77+ is necessary. This is not so trivial as one may think, since it requires a lot of code and patches to be reviewed.
Linux-PAM 0.78 is out, see https://www.redhat.com/archives/pam-list/2004-November/msg00040.html
0.80 in work.
0.80-alt0.4 seems to work.