simulator: fixed some compiler warnings
simulator: print stacktrace to stderr on GCC/Linux compiles