--optimize compiler option does not work for ARM-based CPUs
The --optimize compile option includes some x86 specific instruction sets. These lead to errors when an ARM-based CPU is used. This fix checks for ARM CPU and then ignores the x86 specific instruction. It would be great if some ARM equivalent instructions could be used instead, but I don't know enough about compiler options to do this.