Fix osx imports and build