Do they laugh when he does it, perhaps pet him? If they do, they'll them not to, but instead go "Ack!!" or "Aguh!" some sound of displeasure and walk away from him. Hump = People going away, so it produces a negative effect and takes away attention. You can have him on leash first, and get him to sit and calm down before sniffing your guests. When he doesn't hump, give him reward and praise to encourage the good behavior. Don't forget to neuter him as soon as you can, it'll help reduce the humping when he gets older.
Humping is a dominance behavior, rather than sexual, in this case. I would put him on a leash when people visit (yes, in the house), and keep him near you. You can quickly stop the undesired behavior this way. I agree with the earlier poster to teach the sit command asap. This will break the dog's concentration when he gets the wrong idea. Treat for good behavior. I also agree to neuter your dog as soon as your vet says it's okay. It may not cure it, but it often helps. My 4 year old neutered minipoo usually humps new dogs, but I quickly squash that as soon as I see it, with a loud ack, ack, ack sound. He knows that he'd better stop whatever he's doing if he hears that sound, or something worse will follow - lol!
Neutering will not stop the humping. Do not neuter the pup before 12 months at least.
Hanksimon said it best - teach him to sit, but I would add a no reward marker, (ooops/oi/uh uh but not NO etc) before you ask for the sit, then when he has sat down, praise him and add in a distraction to get his mind away from humping - so it is : "ooops", ask for the sit, reward the sit, and then give him a toy.