Fixes #3759: Move r29129 to v1.7 branch (Deal with PGI compilers on)

---svn-pre-commit-ignore-below---

Trivial adaptation of r29129 from trunk (the file location is
different in the v1.6 branch) [[BR]]

Deal with PGI compilers on the Mac by initializing a global variable.