minor fixes to enable popCount on 32 bit systems

Some benchmarks with 64 bit build with popCount on a intel core i7 ivy
bridge laptop (@3.1 Ghz):
start position: 195 MNps
pos 2 (in wiki): 340 MNps