fix builds on systems that are picky about cc flag order