(mode_compile): Use uintmax_t, not unsigned long, to parse numeric modes. Check for any unknown bits, not just unknown bits left of the leftmost known bit.