Temporal resource variability and the habitat-matching rule