Let $f: \mathbb{R}\to\mathbb{C}$ be one $2\pi$-periodic, Riemann integrable function defined on the real line. The Fourier coefficients of $f$ are defined by
$$a_n = \dfrac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)e^{-in\theta}d\theta.$$
I'm trying to show that if $\overline{a_n}=a_{-n}$ for all $n\in \mathbb{Z}$, then $f$ is real.
My first approach was to write down $f(\theta)=\alpha(\theta)e^{i\beta(\theta)}$ for functions $\alpha,\beta : \mathbb{R}\to\mathbb{R}$.
If we suppose that $\overline{a_n}=a_{-n}$ we have
$$\dfrac{1}{2\pi}\int_{-\pi}^{\pi}\overline{f(\theta)}e^{in\theta}d\theta=\dfrac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta)e^{in\theta}d\theta.$$
In other words we have
$$\dfrac{1}{2\pi}\int_{-\pi}^{\pi}(\overline{f(\theta)}-f(\theta))e^{in\theta}d\theta=0.$$
Thus writing down $f(\theta)$ we have
$$\dfrac{1}{2\pi}\int_{-\pi}^{\pi}(\alpha(\theta)e^{-i\beta(\theta)}-\alpha(\theta)e^{i\beta(\theta)})e^{in\theta}d\theta=0.$$
This is the same as
$$\dfrac{1}{2\pi}\int_{-\pi}^{\pi}-2\alpha(\theta)\sin(\beta(\theta))e^{in\theta}d\theta=0.$$
Thus we found that the Fourier coefficients of the function $-2\alpha(\theta)\sin(\beta(\theta))$ are all zero and here comes the tricky part: by a theorem, if a function defined on the circle is Riemann integrable and continuous and if its Fourier cofficients are zero, the function is zero.
So, if $f$ were continuous, $\alpha,\beta$ would be continuous. Because of that, since the Fourier coefficients of $-2\alpha(\theta)\sin(\beta(\theta))$ are zero, supposing $f\neq 0$, hence $\alpha \neq 0$, we would have $\sin (\beta(\theta))=0$ and so $\beta(\theta) = k\pi$ for some $k$ integer.
This would lead to $f$ real. But this only works if $f$ is continuous.
In the general case how can I show that $f$ is a real function?