diff --git a/lib/virtualbox/ext/platform.rb b/lib/virtualbox/ext/platform.rb
index <HASH>..<HASH> 100644
--- a/lib/virtualbox/ext/platform.rb
+++ b/lib/virtualbox/ext/platform.rb
@@ -1,3 +1,5 @@
+require "rbconfig"
+
 module VirtualBox
   class Platform
     class << self
@@ -18,7 +20,7 @@ module VirtualBox
       end
 
       def platform
-        RUBY_PLATFORM.downcase
+        Config::CONFIG["host_os"].downcase
       end
     end
   end
Use rbconfig to properly detect host OS