Compile statically against Node's OpenSSL headers
diff --git a/binding.gyp b/binding.gyp
index 9b1dc7a..31672b7 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -54,7 +54,8 @@
     ],
     'include_dirs': [
       '.',
-      'include'
+      'include',
+      '<(node_root_dir)/deps/openssl/openssl/include'
     ],
     'conditions': [
       ['OS != "win"', {
@@ -73,6 +74,15 @@
          ]
         ]
       }],
+      ["target_arch=='ia32'", {
+          "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+      }],
+      ["target_arch=='x64'", {
+          "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+      }],
+      ["target_arch=='arm'", {
+          "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+      }]
     ]
   },
   'targets': [
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 2be275b..3faf05e 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -56,7 +56,8 @@
       ],
       'include_dirs': [
         '.',
-        'include'
+        'include',
+        '<(node_root_dir)/deps/openssl/openssl/include'
       ],
       'conditions': [
         ['OS != "win"', {
@@ -75,6 +76,15 @@
            ]
           ]
         }],
+        ["target_arch=='ia32'", {
+            "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+        }],
+        ["target_arch=='x64'", {
+            "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+        }],
+        ["target_arch=='arm'", {
+            "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+        }]
       ]
     },
     'targets': [