You should get the miles for the class you originally paid for.
In this situation (as you have seen) it rarely works automatically, so you should use the retro-claim form on the Air France or KLM websites (available when you log in to your Flying Blue account) to request the miles for the segment(s) involved. Or give them a call.
http://www.flyertalk.com/forum/flyin...pgraded-s.html