Add OS X target

Rearranged the project a little bit and added an OS X target so that
this can be used for mac apps.