Protect against navigator undefined in platform.