Fix build on OSX (and probably FreeBSD).