The inverse boundary problem for the Rayleigh system