Fixed Mac OS compilation