--- a/os.hpp
+++ b/os.hpp
@@ -40,7 +40,7 @@
 #define WINVER _WIN32_WINNT_WINXP
 #define _WIN32_WINNT _WIN32_WINNT_WINXP
 
-#if !defined(ZIPSFX)
+#if !defined(ZIPSFX) && !defined(RAR_SMP)
 #define RAR_SMP
 #endif
 
@@ -49,11 +49,8 @@
 #include <windows.h>
 #include <prsht.h>
 #include <shlwapi.h>
-#pragma comment(lib, "Shlwapi.lib")
-#include <PowrProf.h>
-#pragma comment(lib, "PowrProf.lib")
+#include <powrprof.h>
 #include <psapi.h>
-#pragma comment(lib, "Psapi.lib") // For GetProcessMemoryInfo().
 #include <shellapi.h>
 #include <shlobj.h>
 #include <winioctl.h>
@@ -66,9 +63,7 @@
 
 // For WMI requests.
 #include <comdef.h>
-#include <Wbemidl.h>
-#pragma comment(lib, "wbemuuid.lib")
-
+#include <wbemidl.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
