Check if an I/O error is a cross-device link error (EXDEV on Unix,
ERROR_NOT_SAME_DEVICE on Windows). Used to fall back from rename
to copy+delete when source and destination are on different filesystems.
Create a symlink at link pointing to original, using the correct
platform API. On Windows the call inspects original to decide between
symlink_file and symlink_dir.