I really look forward to the day when people are free to live their lives in peace and without prejudice because of the colour of their skin, their choice of sexual partner, how they choose to dress or whatever other feature is the irrational subject of fear.
However arrogant this may sound, I feel sad for the people of Malawi that fear homosexuals so much that they support their imprisonment. Unfortunately fear breeds fear, and so it perpetuates and grows without external influence.
I don't think it's a good idea to stop development aid. This would just cause more suffering, and the people likely to receive the blame are those that we would be trying to somehow protect.
I think all we can do is hold discussions with senior people in the Malawian government, encouraging them to move towards a programme of establishing equal rights. Maybe also a foreign-funded scheme to improve the image of homosexuals in the view of the public, with successful implementation being rewarded by a special aid bonus to build a needed hospital or piece of infrastructure.