A sensitive period for the induction of host plant preference in a generalist herbivorous insect