Fix when usage as static lib