Making connection to Firefox extension locked by socket lock in .NET

This is to make starting multiple instances of Firefox more stable. Fixes
issue #5089.