In case anyone ends up here, like me, experiencing this problem on a more recent Mac OS (in my case Sierra): None of the other solutions here worked for me. Sierra doesn't give the option to connect in headset or headphones mode, and the bitpool setting made no difference.
I finally figured it out: Going to sound preferences and manually changing the sound input device back to Internal Microphone seemed to switch my headset into headphone mode, making the sound quality worlds better.
Note that you can also do this faster by option-clicking on the volume icon in the menu bar.
Hope that helps someone out there.
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
andsudo defaults write bluetoothaudiod "Enable AAC codec" -bool true