Some people just like to put others down to make themselves feel better. They have a self esteem issue, not you. Ignore what you can because the more it bothers you, the more they will do it. Be the person you are and forget about them.
A real friend wouldn't do this to you. If you really need to say something, then tell them that you find what they say offensive and will not even dignify what they say with an answer. You are the smart one, they are not. So don't change to try to fit in or stoop to their level.
Hatred is unfortunately all around and many people just don't know how to be nice. For them, it's easier to make a snide remark then say something nice. Kill them with kindness. They are wanting you to conform to their ways which aren't good.
No one can hurt you unless you allow it. Please remember that and hold that head up high and be the kind person that you are babe!