[build] fix flags for optimizations to O in uppercase instead of lower.