misc improvements to compilation script