support library with CommonsChunkPlugin

fixes #622