A joint XMM-NuSTAR observation of the galaxy cluster Abell 523: Constraints on inverse Compton emission