[build] fix os x build issues