Fix compilation issues with new library versions