Using platform-independent way to fetch stack trace so the levels don't vary.