Use the correct txtorcon API depending on the software version.

This fixes: https://trac.torproject.org/projects/tor/ticket/12747