build: compiler -pthread(s) check for gcc only.