Jahn-Teller distortions as a novel source of multiferroicity