When installing a rear rack, should I attach the struts to the frame or the seat post on my small bike?
From rack strength perspective it doesn't make much difference. Most of the weight is going straight down to the rear dropout. The front connection is mostly for stability and isn't bearing much weight.  



From the seatpost's perspective, it's already carrying 150+ pounds (75kg+) of the rider. Another few pounds is nothing. (Note that racks that cantilever off the seatpost are another issue and they can put undesirable lateral force on the seatpost). 

The only problem in attaching it to your seatpost means that it'll be harder to adjust your seatpost. One benefit though is that means it's a tad bit harder to steal your seat.