Fix compilation warnings.
Fix test failure of kernel32/loader when WRITECOPY protection is enabled (fixes issue 88).