gen.py: Pass -pthread via ldflags, not libs

This reverts part of commit 0ac93dd2 ("For proper order put -lpthreads as a
'library' not a 'linker flag'").

As explained in https://gn-review.googlesource.com/c/gn/+/4020, we just need
to revert commit 082fbe39 and start passing -pthread in ldflags again, there
is no need to switch to using |libs| instead.

Bug: chromium:934793
Change-Id: I28a32340f858dc8f5369840e6f7e6995d5f3e729
Reviewed-on: https://gn-review.googlesource.com/c/4081
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/build/gen.py b/build/gen.py
index c330abc..c426c0b 100755
--- a/build/gen.py
+++ b/build/gen.py
@@ -334,7 +334,7 @@
       ldflags.append('-maix64')
 
     if platform.is_posix():
-      libs.append('-lpthread')
+      ldflags.append('-lpthread')
 
     if options.use_lto:
       cflags.extend(['-flto', '-fwhole-program-vtables'])