Added stacktrace support with --enable-stack-trace option.