Accurate electron affinities of several diatomic and triatomic molecules