fixed error when building static libraries