Cross-platform API to determine OS version and name in Swift