fix os x build and coding conventions