OSX Stack Trace Fixes

Fixes to correctly output stack stack on OSX in case of a crash.