The solution is simple: DO MORE OVERHEAD SQUATS.
Whether you are cleaning the house, rearranging furniture or threatening your kids by tossing them over your head to prove your insurmountable feats of strength, you can always be practicing your overhead squat position. Its one of those things where stretching your shoulders, loosening up your hip flexors, improving your ankle mobility, etc will ALL benefit you, but you really just have to DO the movement as much as possible to really get better at it. Your body has to get used to finding the right muscles to fire and finding its balance. The only way to do that is to allow the body to feel the movement as much as possible. (AMAP)
I know its a foreign movement being down in a squat with your hands out wide and heavy weight in your hands. Its anything but comfortable. But like everyone says.. "get comfortable with being uncomfortable".
You should be able to OHS anything from a pvc pipe to a toyota camry, but when someone is struggling getting in the overhead squat position with a pvc pipe, I usually put a LITTLE weight in their hands (like a 15-33 lb bar) and that generally allows them to sit a little more comfortably in the squat position (if they stay tight and keep the bar back behind the ears allowing their body to support the weight) because something is weighing them down. However, like I said, your goal should be to squat a pvc pipe and a heavy weight exactly the same. Kapeesh?
So, if your heels come off the ground in a squat, if your shoulders are so tight that the bar wont go back behind your ears, if your torso leans way far forward when trying to get into the OHS, know that these are all common flexibility issues. Work on flexibility on the side, but for the most part, grab your swiffer and get your booty overhead squatting!