Some changes to make compilation and use on MacOS easier.