platform: better darwin support + follow cmt convention more closely