HTC to book US$40 million loss on OnLive stake