Thousands left homeless by quake on Indonesian island