Photodimerization of maleic and fumaric acid derivatives