fixed GH #500: SSLManager causes a crash (use AtomicCounter, remove static Mutex)