reorganize project stucture to enable Podfile and testing on iOS and OS X platforms; fix compilation of OS X sample