Issue #27: moved stack trace stuff out of JSBase