Fix a typo in Makefile.
Use intrinsic MSVC functions for counting leading/trailing zeros.

Around 2.5 faster for 64-bit numbers.
Avoid wrong bit-shifting.

Fixes coverity issue CID#1222015