Taiwan hit by magnitude-6 earthquake