fixed examples linking
Merge pull request #325 from patriotyk/master

Reordered linking of static libraries (-lpthread should be after the static library).
Merge remote-tracking branch 'upstream/master'

* upstream/master:
  fixed examples linking