Added optimisation flags to release builds.