Support running functional tests on Mac as well as headlessly on Linux