Misc fixes for gnu make