Refactored platform specific accesses prior to adding support for Mono/Linux. Note that Mono/Win32 won't be supported as Mono does not support System.Management namespace.