Switched to an iOS library

Set some defines and manged some platform-specific folders in the
project.