dynamic selection of debug and release libraries for externals