hmap: Use is_pow2() instead of open-coding it.