Fix OpenBSD/macppc compilation, and improve configure detection for ARM/Sparc/AMD64