hacks: Fix unlinking of Android NDK directories if install fails midway
Hey!
This is a MR to ensure that the correct API is called depending on the target type. I found this when retrying the bootstrap for Android, which always failed due to an attempt to call unlink
on a directory.