China defends legitimacy of oil rig in South China Sea