It was a derby defeat to forget for Milan, but one for Zlatan Ibrahimovic to remember as he broke goalscoring records.