fix static build (reported by leandroong)