French athlete to swap hijab for cap to avoid ban from Olympics opening ceremony