ARM support

This PR adds initial ARM support. Please note that I'm not sure if the compiler/linker flags are OK - double check this. We use this patch in Fedora and it works well.