Corrected build flags for libraries and Mac framework