I'm using P/Invoke, which consists of loading the wrapped functions from C DLLs. So static linking is not an option here.
The other solution to create a .Net binding is to use C++/CLI, and there you could probably use static linking, but as far as I know Mono doesn't support C++/CLI.
To get rid of this bug on .Net there's no choice but to solve it in the C++ API directly.