More robust implementation for finding the beginning of the stack.

This patch inserts an extra stack frame above the function that
calls the actual Nimrod code and ensures that a reference to this
frame is stored as the stack bottom.
Merge pull request #1400 from rbehrends/fix-stackscan

More robust implementation for finding the beginning of the stack.