Add missing thread_safe dependency