Fixes #4178: Move r30411 to v1.7 branch

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

r30411 [[BR]]
Fixes #4143

After IM with Nathan, apply patch from ticket after verification by Paul Hargrove that it fixes the problem on non-x86 32-bit platforms

Verified by Paul, RM-approved

cmr=v1.7.4:reviewer=ompi-gk1.7