fixed examples linking

linking static libraries with gcc requires right order, -lpthread should be after the static library which it use. So I wasn't able to compile examples.