increase thread stack size to 4M during compilation to avoid StackOverfl...

...ow errors