Southern Taiwan has been struck by a 6.4 magnitude earthquake, with reports of minor damage to some buildings.