fixed the hamming distance function not to use 64-bit pop count.

 This should fix compile errors on Windows