Fix 32 bit build.

This fixes GitHub pull request #2503.

Sorry for the breakage, I only tested on 64 bit locally.