Fix writing to OBJ file with no material. (Half of #2)