Spain: King holds last-minute talks to avoid election