Invariants of finite linear groups on relatively free algebras