Added conditional compilations

Added conditional compilations to make locations compatible with iOS  7 and earlier