Add support for building as a static library