Have Gradle observe LDFLAGS/CXXFLAGS/CPPFLAGS

This allows building with a private proto installation (one in home
directory or elsewhere) by specifying -I and -L.
diff --git a/compiler/build.gradle b/compiler/build.gradle
index 2093b9d..acfd0f5 100644
--- a/compiler/build.gradle
+++ b/compiler/build.gradle
@@ -9,7 +9,16 @@
 binaries.all {
   if (toolChain in Gcc) {
     cppCompiler.args "-std=c++11"
+    if (System.env.CXXFLAGS) {
+      cppCompiler.args System.env.CXXFLAGS
+    }
+    if (System.env.CPPFLAGS) {
+      cppCompiler.args System.env.CPPFLAGS
+    }
     linker.args "-lprotoc", "-lprotobuf"
+    if (System.env.LDFLAGS) {
+      linker.args System.env.LDFLAGS
+    }
   }
 }