In-beam tests of the AMS RICH prototype with 20 A GeV/c secondary ions