Makefile changes to get ARM builds working plus some undefined behaviour fixes
Merge pull request #1034 from runrevfraser/feature-rpi

Make building for RPi possible for 7.0