Small changes to make Ubuntu/Debian on ARMhf work (and probably others).