Fixed check for dynamic libraries for CLR2 builds