Enable gcc O2 optimization