Some small fixes to make it build on ARM (tested on Raspberry Pi running ArchLinuxARM)