Looks like a band-aid for bad API.
If the library is open source, you can of course try to contribute changes, but they may or may not be accepted, and maybe the library is in such wide use that they don't want to break backward compatibility.
In any language it is possible to fix broken libraries.