Well, if you don't want to be an ass about it to him, just ask why he does it. Ask if he seriously likes her, or if he just does it to be friendly. Also tell him you won't be mad with his answer.
If it comes to him saying "I do it because I'm friendly", simply state that it's annoying both you and her and tell him to act friendly in a different matter.
If he comes to him saying "It's because I like her", say the same thing from above, and state that you'd prefer him not hitting on your girlfriend.
But, if you want to be a complete richard about it, just say "GET THE forget OFF MY GIRL" and kick his ass.