The 37 year-old striker is currently recovering from knee surgery.
He said: "Until recently, I thought I'd play for a long time. I am struggling with a bad injury but I am not demoralized.
"After a night like the one against Real, I've been waiting for 20 years for that, then the week after you breakdown, it hurts a lot.
"Then I looked back and I saw all that I did, it gives me the strength to go forward. I accept what has happened to me, the time out is long, the operation went well.
"I want to stay in the football and especially with Milan. Two more years? Before the accident I'd answer yes."