Changed standard from gnu99 to c99 (former was needed for timing
functionality) and added O3 optimization flag.