Fix compilation error on OSX

Only tested on OSX.