Kansas lawmakers pass school funding fix to avert shutdown