Reactive power optimisation with small-signal stability constraints