-# Reset \@INC completely, adding the directories we need, and removing the
-# installed directories (which we don't need to read, and may confuse us)
-\@INC = ($inc);
+# Replace the first entry of \@INC ("lib") with the list of
+# directories we need.
+${\($^O eq 'MSWin32' ? '${^WIN32_SLOPPY_STAT} = 1;':'')}
+splice(\@INC, 0, 1, $inc);
+\$^O = '$osname';