A generic approach yields organic solar cells with enhanced efficiency and thermal stability