Bugfix: CommonLibrary error with multiple library types

When XXX_LIBRARY_TYPE is a list, e.g. STATIC;SHARED, CMake
fails on line 94.
Merge pull request #213 from eile/master

Improved version for #212