Remove some more unused P/Invokes, and #if away some Win32-only code.