Fixed pthread-lib handle
Merge branch 'FlorianRudolf/fix-cmake' into next