Various build fixes

What for?