Fixed detection failure on ons-if-platform and iOS.