fix mac os x building issues