Fix build bustage on gcc 4.6 due to signed/unsigned comparison warnings.