USG reports third-quarter net loss of $40 million