Fixed issue when building with ios prior to 7