Use 'window.sms' instead of 'sms', so we can check for availability.