Added a temporary not so pretty tweak with pthreads because I couldn't get Boost to comply, and sthi piece of crap version of gcc doesn't support std::thread :(. To be replaced later with the commented boost:::thread code