Fixed compilation of examples on MacOS