[tools] Some build tweaks