Fixed bug #141

This fixes bug #141. Didn't find a better strategy, but it works. Only difference is, that pthreads classes which were in a static variable are shown as Unknown instead of NULL, but this shouldn't make problems.

I fixed also some compiler warnings I had locally (a few casts and parenthesis decoration etc.).

(You're always too slow to fix it before I do ;-P)