A categorical approach to the extension of social choice functions