fix Issue 11112 - Unable to execute shell commands in different threads

- the initializer was only called for the main thread