An ingredient in some cough medicines may help in the fight against Type 2 diabetes, new findings suggest.