Add BSD specific includes. Add case for Windows on ARM CPUs. Add
compatibility header.