Fix the windows build.
Implement the calculation of stack bounds on windows. Fixes #11624.