removed deprecated method in gestalt and added compilier conditionals around iOS 7 only stuff