Various small build fixes