Simulate single threading via mutex to prevent errors in non-threadsafe httplib2