Add a type coercion to avoid compiler error. 

Some compilers just don't have pow defined for unsigned ints =(.