How to disable file locking on mac?

The LibreOffice readme says to disable file locking just comment out the line export SAL_ENABLE_FILE_LOCKING in the soffice script - on mac I found the soffice file at /Applications/LibreOffice.app/Contents/MacOS/soffice, but the file type is Mach-O 64-bit executable x86_64. Is there a way to edit this file anyway, or another workaround to disable file locking?