I have friends who, although not obese in my opinion, consider themselves to be so and are clearly not happy with their body image. The strategy I suggest here is the one that has had the better results in my experience with them.
Given that your friend sometimes makes statements related to their obesity, I think it is safe for you to try and address the issue - I wouldn't recommend it if they hadn't, for it could mean they aren't prepared to discuss it yet, or even to recognize they have this problem in front of others.
In order to communicate your support to your friend, I would wait until they make another remark like the ones you mentioned ("I've been trying to make exercise a habit", "I'm cutting back on..."). Then, don't say something in the same tenor of their comment, but be straightforward. Look them in the eye to convey you are serious about what you are about to say and ask something along the lines of:
Do you feel very bad about your weight/body?
Be as warm as you can and then listen. I have found these direct questions to work very well. In my experience, people open up and don't seem to feel awkward about it, but relieved.
If you think this is too abrupt, you can first ask for more details like in the example you gave in one of your comments ("How is your workout routine going?") and then go for the real question.
Once your friend and you have had an open conversation about their obesity, bringing up the subject again in the future will be much easier and then you can ask if they want any concrete help from you or just emotional support when they feel discouraged.
Why do I think this is a good approach?
If you keep the conversation on the casual level ("Are you following any diet?"), to change the tone of the chat to a deeper, more serious one takes some effort and courage on their part. They might not know if you will be comfortable with them being vulnerable in front of you. However, when you are the one who takes the step, you make it easier for them to share what they are really feeling or struggling with if they want to do so.
Also, I think it better to ask how they are feeling rather than if they want to have a serious conversation about their obesity, because the second feels less natural, makes the whole thing appear bigger and puts more pressure into the conversation.
In the past, when someone made a remark that showed they were not confortable with their body, I would tell them they looked ok, or that they shouldn't worry so much about it, but I have noticed this doesn't help. In fact, more often that not, the person ends up being kind of ashamed of feeling what they feel. The approach above, though, makes no judgement about what they should or should not feel and gives them room for opening up to you.
Hope this helps.