diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb
index 7dbd2b3..92251e3 100644
--- a/ext/rugged/extconf.rb
+++ b/ext/rugged/extconf.rb
@@ -70,7 +70,7 @@ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES'])
 
   major = minor = nil
 
-  File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
+  File.readlines(File.join("/usr", "include", "git2", "version.h")).each do |line|
     if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
       major = matches[1]
       next
