Origin of terminal voltage variations due to self-mixing in terahertz frequency quantum cascade lasers.