Tackling Distribution Shifts in Task-Oriented Communication with Information Bottleneck