Minimal subtraction and momentum subtraction in quantum chromodynamics at two-loop order