Fix 32 bit build

Closes #2324
Review 1484 by @srh