Fix system icu build.

It turns out that Skia's gn 'system' and 'third_party' templates differ
in the way public defines are declared. This also updates the build to
add libdl when building SkOSLibrary_posix.cpp, since that uses dlsym.
The current build depends on icu bringing in this dependency.

BUG=skia:7008

Change-Id: Ia710a335e1da9580f85f133a5a171f640b36ee75
Reviewed-on: https://skia-review.googlesource.com/41745
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 0e4c071..e7a495a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -760,6 +760,7 @@
       "src/ports/SkOSLibrary_posix.cpp",
       "src/ports/SkTLS_pthread.cpp",
     ]
+    libs += [ "dl" ]
   }
 
   if (is_android) {
diff --git a/third_party/icu/BUILD.gn b/third_party/icu/BUILD.gn
index 0a1683e..68a5923 100644
--- a/third_party/icu/BUILD.gn
+++ b/third_party/icu/BUILD.gn
@@ -12,7 +12,7 @@
 if (skia_use_system_icu) {
   system("icu") {
     libs = [ "icuuc" ]
-    public_defines = [ "U_USING_ICU_NAMESPACE=0" ]
+    defines = [ "U_USING_ICU_NAMESPACE=0" ]
   }
 } else {
   third_party("icu") {