Fixed a few issues with the MacOS detection