remove Linq dependency

Removing the Linq dependency enables .net 2.0 dependency thus improves
backward compatibility.