Solve OS X build problem due to UIDevice usage