Ex Thai PM told to pay $997 million over subsidy scheme