On the optimal harvesting of size-structured population dynamics