Let $M$ be a compact, oriented surface. If we have a complex vector bundle $E$ over $M$, then we can define the first Chern number $c_1(E)$ via Chern-Weil theory. More precisely, if $\nabla$ is a connection on $E$, then for a local frame $u_1,\ldots,u_k$ we can define the $1$-forms $A_j^i$ by the formula $$\nabla u_j = \sum_i A_j^i u_i, $$ and then define the curvature by $$F := dA + A \wedge A,$$ where $A$ is the matrix $(A_j^i)$ of $1$-forms.
The first Chern number is defined by $$c_1(E) = \frac{1}{2\pi i}\int_M \mathrm{tr}(F),$$ and this number does not depend on the choice of connection $\nabla$.
Two complex vector bundles $E_1, E_2$ are $\mathbb C$-isomorphic if there is a diffeomorphism $f:E_1 \to E_2$ such that the diagram
commutes and $f$ restricted to the fibers is $\mathbb C$-linear. Analogously, the complex vector bundles are $\mathbb R$-isomorphic if the map $f$ restricted to the fibers is $\mathbb R$-linear.
If the $E_1$ and $E_2$ are $\mathbb C$-isomorphic, then $c_1(E_1) = c_1(E_2)$, and if they are $\mathbb R$-isomorphic, then $c_1(E_1) = c_1(E_2) \mod 2$.
Nevertheless, I only know how to prove the second property via Stiefel–Whitney numbers: in short, we have $c_1(E_1) = w_2(E_1) \mod 2$.
Question: If $f:E_1 \to E_2$ is an $\mathbb R$-isomorphism, how do I prove $c_1(E_1) = c_1(E_2) \mod 2$ direct from Chern-Weil approach, without using general characteristic classes?
If $E_1$ and $E_2$ are line bundles, then the proof is actually simple, because in this case we have $$c_1(E) = \frac{1}{2\pi i}\int_M F,$$ that coincides it the Euler number, and it is easy to prove that $c_1(E_1) = c_1(E_2)$ if $f$ preserves orientation, and $c_1(E_1) = -c_1(E_2)$ if $f$ reverses the orientation.
I would be satisfied with a proof for rank $2$.
