[runtime] Fix stack size detection on osx mavericks. Fixes #15890.