[SharpDX] Fix issues with recent changes in ComObject management