Improving the stability of solar cells using metal–organic frameworks