Various fixes to not bork the host system when building