Fix bug to allow static library creation