Add flag to choose optimization level on the fly.