Fix to build with mac