Portability fixes to run Homebrew on Linux systems