Fix reference error for undefined React.