Well I think a polite why to reject a hug is: when some is coming towards you to hug you take a step back from them and bow your head with a smile. This way you have already greeted them in a respectful manner and no further greeting is warrented. Its kind of like a preemptive strike.
Or you could just cross your arms. That's a pretty clear signal that you don't want to be touched, though that might be a stronger statement than you want.