WINDOWS: handle stack overflow. replace setjmp implementation with something much simpler (wasn't essential for this). closes #1971