Control of a variable speed wind turbine