Income taxes - Schedule of Tax Effects of Temporary Differences (Details) - USD ($) $ in Thousands |
Dec. 31, 2016 |
Dec. 31, 2015 |
|---|---|---|
| Deferred tax assets: | ||
| Net operating loss carryforwards | $ 172,851 | $ 134,448 |
| Foreign tax credit carryforwards | 81,510 | 72,019 |
| Research and development credit carryforwards | 31,251 | 31,251 |
| Alternative minimum tax credit carryforwards | 5,055 | 5,145 |
| Deferred revenue | 52,229 | 44,821 |
| Other | 50,797 | 46,045 |
| Subtotal | 393,693 | 333,729 |
| Valuation allowances | (318,887) | (186,993) |
| Total deferred tax assets | 74,806 | 146,736 |
| Deferred tax liabilities: | ||
| Property, plant and equipment | (64,876) | (73,491) |
| Other | (15,615) | (9,654) |
| Total deferred tax liabilities | (80,491) | (83,145) |
| Net deferred tax liabilities | $ (5,685) | |
| Net deferred tax assets | $ 63,591 |