Replaced __builtin_clrsbll() with some bit stuff and __builtin_clzll() so it'll compile on GCC 4.4.