The least I can do for sure is to do that.
For info, for anyone else, the reason it was failing despite the changes was because later on I run a "if FileExists(path to library)" which of course returns false, now, because the file does not exist on the filesystem in the same way with BigSur. So I basically created 3 ifdef compiler directives - one for Windows, one for Linux and one for OSX, and the OSX one does not do the file lookup.