Fix building on linux & OS X