On a variational problem modelling necking deformation