fixed compilation issue on OSX