Variable-topology shape optimization with a control on perimeter