D.R. Horton swings to loss in first quarter