Riemann-Hilbert problems for the Ernst equation and fibre bundles