Fix install target when building out-of-tree
Detect Apple toolchain instead of relying on uname

This allows cross-compiling for Android on a Mac.