KB Home Q2 net loss narrows