Fixed bug for building on Mac