fixes for static builds, seems github version is old