Optimal structural design under stability constraints