Added support for building libraries