Update thread.c

Replaced int_pow with bitshifts. It seemed unnecessary to use a function to compute powers of two, when a simple bitshift assignment would do. Tested the change on Mac OS X Snow Leopard with apple gcc-4.2, and I had no problems.