Fixes compiling and tests under 32bit mode.

fixes #40.