how did korea gain independence from japan