[OS X & Linux] Fix compilation