On the relationship between buckling and optimal structural design