Add optional thrift dependency in setup.py