tools/mkimage: fix build on MacOS arm64