some Mac building optimization