Enable gcc optimization flags for improved performance.