Added support to arm64 and some changes on how to lipo and copy the head...

...ers files

I had some unresolved externals problems trying to compile for i386 with this changes, but as I wanted to help someone who want to compile for arm64, I decided to pull this request in order to help these people.