Exhibit 10.5 REGISTRATION RIGHTS AGREEMENT Dated as of August 18, 1997