Fix to allow avro specific types to be used

If a class generated from an avro scheme is found on the classpath, it will be used
instead of GenericData.Record, so we need to use IndexedRecord which is an ancestor
of both GenericData.Record and SpecificRecordBase.