Fixed compilation error on Mac OSX