Increase thread stack for OS X (#2035)