fix compile with non-static builds