Fix gcc warning / clang error
Fix posix std-thread build