Fix build on Linux/OSX