Support managehome on windows and ruby 1.9

Fix Win32API method signatures so that we can managehome on ruby 1.9