Legislature votes to extend expiring health plan