added compile conditions for ios7