Instability in the terms of trade of primary producers