fix build with non-static builds