Fix build script
Add some flags to linux and mac builds