diff --git a/ext/extconf.rb b/ext/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/extconf.rb
+++ b/ext/extconf.rb
@@ -6,7 +6,7 @@ require 'ffi'
 begin
   module LibTest
     extend FFI::Library
-    ext = FFI::Platform.windows? ? 'dll' : 'so'
+    ext = FFI::Platform::LIBSUFFIX
     bundled_dll = File.expand_path("../../lib/libusb-1.0.#{ext}", __FILE__)
     ffi_lib(['libusb-1.0', bundled_dll])
   end
Fix library suffix for OSX in extconf.rb, too.